<KeyListEntry name="screenshot-window"
description="Take a screenshot of a window"/>
+ <KeyListEntry name="show-screen-recording-ui"
+ description="Record a screencast interactively"/>
+
</KeyListEntries>
\ No newline at end of file
<default>["Print"]</default>
<summary>Take a screenshot interactively</summary>
</key>
+ <key name="show-screen-recording-ui" type="as">
+ <default>["<Ctrl><Shift><Alt>R"]</default>
+ <summary>Record a screencast interactively</summary>
+ </key>
<key name="screenshot-window" type="as">
<default>["<Alt>Print"]</default>
<summary>Take a screenshot of a window</summary>
showScreenshotUI
);
+ Main.wm.addKeybinding(
+ 'show-screen-recording-ui',
+ new Gio.Settings({ schema_id: 'org.gnome.shell.keybindings' }),
+ Meta.KeyBindingFlags.IGNORE_AUTOREPEAT,
+ uiModes,
+ showScreenRecordingUI
+ );
+
Main.wm.addKeybinding(
'screenshot-window',
new Gio.Settings({ schema_id: 'org.gnome.shell.keybindings' }),
});
}
+/**
+ * Shows the screen recording UI.
+ */
+function showScreenRecordingUI() {
+ Main.screenshotUI.open(UIMode.SCREENCAST).catch(err => {
+ logError(err, 'Error opening the screenshot UI');
+ });
+}
+
var ScreenshotService = class {
constructor() {
this._dbusImpl = Gio.DBusExportedObject.wrapJSObject(ScreenshotIface, this);